Skip to content

fix(rust): remove rls and rust-analysis for Rust 1.87+ compatibility #1362

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 19, 2025

Conversation

liskin
Copy link
Contributor

@liskin liskin commented May 15, 2025

Rust 1.87.0 and later have removed the long-deprecated RLS and rust-analysis components. This change updates the install script to only add rust-src, rustfmt, and clippy, preventing build errors during feature installation. See: rust-lang/rust#126856 https://blog.rust-lang.org/2022/07/01/RLS-deprecation/ https://github.com/rust-lang/rustup/blob/a92432fc8b6d5d4e56ebd08ca1c45b7b1294c1bd/doc/user-guide/src/concepts/components.md#previous-components

Fixes: #1361

Rust 1.87.0 and later have removed the long-deprecated RLS and rust-analysis
components. This change updates the install script to only add rust-src,
rustfmt, and clippy, preventing build errors during feature installation. See:
rust-lang/rust#126856
https://blog.rust-lang.org/2022/07/01/RLS-deprecation/
https://github.com/rust-lang/rustup/blob/a92432fc8b6d5d4e56ebd08ca1c45b7b1294c1bd/doc/user-guide/src/concepts/components.md#previous-components

Fixes: devcontainers#1361
@liskin liskin requested a review from a team as a code owner May 15, 2025 23:10
@NeoScript
Copy link
Contributor

Hey! I just added a couple more changes: liskin#1
This will help replace rls with rust-analyzer and prevent versions older than 1.64 to prevent issues where rust-analyzer is not available.

Not 100% familiar with fork etiquette so I kinda just added it on to your fork. Thanks!

@NeoScript
Copy link
Contributor

NeoScript commented May 15, 2025

Also, as a quick workaround for anyone facing a similar problem. Just pin rust to 1.86 for now inside your .devcontainer/devcontainer.json file under features:

"ghcr.io/devcontainers/features/rust:1": {
	"version": "1.86",
	"profile": "default"
}

Tip

Read more about rustup profiles here

@Mathiyarasy Mathiyarasy self-requested a review May 16, 2025 11:04
@Mathiyarasy
Copy link
Contributor

Mathiyarasy commented May 16, 2025

Thank you @liskin and @NeoScript for your contributions.
Please increment the version in rust feature.
If you merge the PR of Further fixes for rls deprecation #1
I think this PR gets ready to be merged ..

@liskin
Copy link
Contributor Author

liskin commented May 16, 2025

@microsoft-github-policy-service agree

(although I wonder if it's really me who needs to agree, as this CLA nonsense started only after I've pulled @NeoScript's commits into my branch…)

@NeoScript
Copy link
Contributor

@microsoft-github-policy-service agree

Hello! Sorry I've not seen any notifications around the service agree but just in case.

@eljog
Copy link
Member

eljog commented May 19, 2025

Approving workflow run

Copy link
Member

@eljog eljog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution 🎉

@eljog eljog merged commit 94ed0bb into devcontainers:main May 19, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rust: Fails since Rust 1.87.0 (2025-05-15)
4 participants